import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/business',
  component: Layout,
  redirect: '/business/order_record',
  name: 'business',
  meta: {
    title: '业务管理',
    i18n: 'route.breadcrumb.root',
    icon: 'busi',
  },
  children: [
    {
      path: 'order_record',
      name: 'order_record',
      component: () => import('@/views/business/order_record.vue'),
      meta: {
        title: '订单信息',
      },
    },
    {
      path: 'trans_record',
      name: 'trans_record',
      component: () => import('@/views/business/trans_record.vue'),
      meta: {
        title: '运单管理',
      },
    },
    {
      path: 'car_monitor',
      name: 'car_monitor',
      component: () => import('@/views/business/car_monitor.vue'),
      meta: {
        title: '车辆监控',
      },
    },
    // {
    //   path: 'route_plan',
    //   name: 'route_plan',
    //   component: () => import('@/views/business/route_plan.vue'),
    //   meta: {
    //     title: '路径规划',
    //   },
    // },
  ],
}

export default routes
